package com.zzl.bonds.ticket.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zzl.bonds.ticket.dto.TickecirculationErnterpriseAddDto;
import com.zzl.bonds.ticket.dto.TickecirculationErnterpriseUpdateDto;
import com.zzl.bonds.ticket.entity.TicketCirculationEnterpriseEntity;
import com.zzl.general.common.exception.SysException;
import com.zzl.general.common.serurity.entity.User;
import com.zzl.general.common.utils.PageUtils;

import java.util.List;
import java.util.Map;

/**
 * 票据流转企业
 *
 * @author gull
 * @date 2022-07-06 13:43:52
 */
@SuppressWarnings("javadoc")
public interface TicketCirculationEnterpriseService extends IService<TicketCirculationEnterpriseEntity> {

    /**
    * 分页查询
    *
    * @param params 查询参数
    * @return 分页数据
    */
    PageUtils queryPage(Map<String, Object> params);

    /**
    * 新增
     *
    * @param tickecirculationErnterpriseAddDto 新增实体
    * @param user 当前登录用户
    * @throws SysException 业务异常
    */
    void saveTickecirculationErnterprise(TickecirculationErnterpriseAddDto tickecirculationErnterpriseAddDto, User user) throws SysException;

    /**
     * 修改
     * @param tickecirculationErnterpriseUpdateDto 修改实体
     *
     * @param user 当前登录用户
     * @throws SysException 业务异常
     */
    void updateTickecirculationErnterpriseById(TickecirculationErnterpriseUpdateDto tickecirculationErnterpriseUpdateDto, User user) throws SysException;

    /**
     * 开立id和流转企业id获取单条信息
     * @param ticketOpenId
     * @param circulationEnterpriseId
     * @return
     */
    TicketCirculationEnterpriseEntity getByTicketOpenIdAndCirculationEnterpriseId(String ticketOpenId,String circulationEnterpriseId);

    /**
     * 获取该票的可转单企业id
     * @param ticketId
     * @return
     */
    List<String> getAcquirerDropDownList(String ticketId);
}

